/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package delta.productcatalog.controller;

import delta.productcatalog.model.Product;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author Kate
 */
@Stateless
public class ProductManager extends AbstractFacade implements ProductManagerLocal, ProductManagerRemote {

    @PersistenceContext(unitName = "delta-PU")
    EntityManager em;

    @Override
    protected EntityManager getEntityManager() {
        return em;
    }

    public ProductManager() {
        super(Product.class);
    }

    public void create(Product entity) {
        super.create(entity);
    }

    public void edit(Product entity) {
        super.edit(entity);
    }

    public void remove(Product entity) {
        super.remove(entity);
    }

    public Product find(int id) {
        return (Product) super.find(id);
    }

    public List<Product> findAll() {
        return super.findAll();
    }

    public List<Product> findRange(int firstResult, int maxResults) {
        return super.findRange(firstResult, maxResults);
    }
}
